package org.scau.studentevaluation.client;

import org.scau.studentevaluation.entity.bo.CheckTableItem;
import org.scau.studentevaluation.entity.query.ExamQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: ExamClient
 * @Description: TODO
 * @Author: sunslikes
 * @Date: 2020/9/4 3:31
 * @Version: 1.0
 */
@FeignClient(value = "eureka-client-exam", fallback = ExamClientHystrix.class)
public interface ExamClient {
    /**
     * 	通过other_act_id从exam中获取信息（通过feign调用exam模块中查询exam信息的方法）
     * @param otherActId
     * @return
     */
    @RequestMapping(value = "/exam/listExamByOtherActId/{otherActId}", method = RequestMethod.GET)
    ArrayList<CheckTableItem> listExamByOtherActId(@RequestParam("otherActId") Long otherActId);

    /**
     * 	通过college、ruleYear、passed从exam中获取actId（通过feign调用exam模块中查询actId的方法）
     */
    @RequestMapping(value = "/exam/listActId", method = RequestMethod.GET)
    ArrayList<Long> listActId(@RequestParam("college") String college, @RequestParam("ruleYear") Integer ruleYear, @RequestParam("isPassed") Integer isPassed);


    /**
     * 	通过actId从exam中获取exam列表
     * @param actId
     * @return
     */
    @RequestMapping(value = "/exam/listExamByActId/{actId}", method = RequestMethod.GET)
    ArrayList<CheckTableItem> listExamByActId(@RequestParam Long actId);

}
